Updated documentation, added geojson.geojson test file, updated vecs array according...
authorHarel Mazor <harel.mazor@gmail.com>
Wed, 25 Jan 2017 21:49:57 +0000 (23:49 +0200)
committerHarel Mazor <harel.mazor@gmail.com>
Wed, 25 Jan 2017 21:49:57 +0000 (23:49 +0200)
geojson.cc
reference/track/geojson.geojson [new file with mode: 0644]
xmldoc/formats/geojson.xml

index 00bb41bb7f76e4fcce45dbe545cd6981c43bde36..20c05ea937791094dfe1804c01a871bb33b5ffac 100644 (file)
@@ -313,7 +313,11 @@ geojson_write(void) {
 
 ff_vecs_t geojson_vecs = {
   ff_type_file,
-  { (ff_cap)(/*ff_cap_read | */ff_cap_write), ff_cap_write, ff_cap_none },
+  { 
+       (ff_cap)(ff_cap_read | ff_cap_write) /* waypoints */,
+       (ff_cap)(ff_cap_read | ff_cap_write) /* tracks */,
+       (ff_cap)(ff_cap_read | ff_cap_write) /* routes */, 
+  },
   geojson_rd_init,
   geojson_wr_init,
   geojson_rd_deinit,
diff --git a/reference/track/geojson.geojson b/reference/track/geojson.geojson
new file mode 100644 (file)
index 0000000..83862b5
--- /dev/null
@@ -0,0 +1 @@
+{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[1.0,1.0]},"properties":{}},{"type":"Feature","geometry":{"type":"MultiPoint","coordinates":[[2.0,2.0]]},"properties":{}},{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[3.0,3.0],[4.0,4.0],[5.0,5.0],[3.0,3.0]]]},"properties":{}},{"type":"Feature","geometry":{"type":"LineString","coordinates":[[6.0,6.0],[7.0,7.0]]},"properties":{}},{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[8.0,8.0],[9.0,9.0],[10.0,10.0],[8.0,8.0]]]]},"properties":{}},{"type":"Feature","geometry":{"type":"MultiLineString","coordinates":[[[11.0,11.0],[12.0,12.0]],[[12.0,12.0],[13.0,13.0]],[[14.0,14.0],[15.0,15.0]]]},"properties":{}}]}
\ No newline at end of file
index ae1eb44b1e2af42a9517af036db785f80932d848..f4e91396633c28650183ff550f8999e3443a98a4 100644 (file)
@@ -10,15 +10,14 @@ that GPSBabel supports well to something like Leaflet, you should not expect
 high fidelity transfers through this format.
 </para>
 <para>
-Initially, only write support for waypoints and tracks is available.  
-Waypoints are converted to a FeatureCollection of Points.  
+Waypoints are mapped to a FeatureCollection of Points.  
 The properties for name and description are written, where available.
 Tracks are converted to a LineString.
+MultiPoint are converted to Waypoints.
+LineString, Polygon and MultiPolygon are converted to routes.
+MultiLineString are conveted to tracks.
 </para>
 <para>
-Potential future work includes the ability to read Point Features and/or
-LineStrings as these would map into our concept of waypoints and 
-routes/tracks.
 The potentially nested/recursive nature of GeoJSON in general would be 
 an awkward implementation.
 </para>